8080 Mode(SSD1963データシート抜粋) The 8080 mode MCU interface consist of CS#, D/C#, RD#, WR#, D[23:0] and TE signals (Please refer toTable 6-1 for pin multiplexed with 6800 mode). This interface use WR# to define a write cycle and RD# forread cycle. If the WR# goes low when the CS# signal is low, the data or command will be latched into the system at the rising edge of WR#. Similarly, the read cycle will start when RD# goes low and end at the rising edge of RD#. (WR、RDの立ち上がりパルスでシステムに取り込み)The detailed timing will show in the chapter 13.2. |
||
RSDC(D/C#)の由来
RS : Register select
|
A 16X2 LCD has two registers, namely, command and data. The register select
is used to switch from one register to other. RS=0 for command register,
whereas RS=1 for data register.
Command Register: The command register stores the command instructions given to the LCD. A command is an instruction given to LCD to do a predefined task. Examples like:
Processing for commands happens in the command register. Data Register: The data register stores the data to be displayed on the LCD. The data is the ASCII value of the character to be displayed on the LCD. When we send data to LCD it goes to the data register and is processed there. When RS=1, data register is selected. |
(例) //PMP 16ビットパラレル送信関数 //8080 16bit parallel parallel //RS: RG13 // Definitions for RS pin PIC32MZ #define DisplaySetCommand() LATGbits.LATG13 = 0 //RS = 0 #define DisplaySetData() LATGbits.LATG13 = 1 //RS = 1 //データ送信関数 //Data send function void ys_WriteData(short data) { DisplaySetData(); //RS = 1; ys_DeviceWrite(data); } //コマンド送信関数 //Command send function void ys_WriteCommand(unsigned char cmd) { DisplayEnable(); //CS = 0; DisplaySetCommand(); //RS = 0; ys_DeviceWrite(cmd) ; DisplayDisable(); //CS = 1; } |